<extend name="work/base"/>
<block name="content">
    <header class="wx-header">
        <h1 class="wx-title">失物登记</h1>
    </header>

    <form id="loseform">
        <div class="weui-cells__title">电话</div>
        <div class="weui-cells">
            <div class="weui-cell">
                <div class="weui-cell__bd">
                    <input class="weui-input" type="text" placeholder="请输入联系电话" name="phone">
                </div>
            </div>
        </div>
        <div class="weui-cells__title">内容</div>
        <div class="weui-cells ">
            <div class="weui-cell">
                <div class="weui-cell__bd">
                    <textarea class="weui-textarea" name="info" placeholder="失物说明" rows="5"></textarea>

                </div>
            </div>
        </div>
    </form>

    <div class="top20">
    </div>
    <div style="width: 95%;margin: auto">
        <a href="javascript:;" class="weui-btn weui-btn_primary">发布失物信息</a>
    </div>
    <div class="weui-cells__tips" style="color:#e64340;"> <a  href="https://mp.weixin.qq.com/s?__biz=MzIyNzI2Mjc3OA==&mid=100000419&idx=1&sn=989f80b27092476694f61b44205ae564&chksm=6862aaf65f1523e0d2d6e21a8713ab2146b326b5ab22e998768e1bfb37614caf9eeb06f9c39e#rd " >{:config('param.lose_info')}</a> </div>
    <div class="weui-msg__extra-area">
        <div class="weui-footer">
            <p class="weui-footer__text"></p>
        </div>
    </div>
</block>
<block name="script">
    <script type="text/javascript">
        $(document).ready(function () {
            $(".weui-btn_primary").click(function () {
                $.ajax({
                    type: 'post',
                    url: '',
                    data: $("form").serialize(),
                    success: function (data) {
                        if (data.code == 1) {
                            $.toast(data.msg);
                            $('#loseform')[0].reset();
                        } else {
                            $.toast(data.msg, "cancel");
                        }
                    }
                });
                return false;
            });

        });
    </script>
</block>
